{% extends "base.html" %}

{% block title %}忘记密码 - SteHub{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-6 col-lg-5">
        <div class="card">
            <div class="card-header">
                <h3 class="text-center mb-0"><i class="fas fa-key me-2"></i>找回密码</h3>
            </div>
            <div class="card-body">
                <p class="text-muted text-center mb-4">
                    请输入您注册时使用的邮箱地址，我们将发送密码重置链接。
                </p>
                
                <form method="POST" action="{{ url_for('auth.forgot_password') }}">
                    <div class="mb-3">
                        <label for="email" class="form-label">邮箱地址</label>
                        <input type="email" class="form-control" id="email" name="email" 
                               value="{{ request.form.email if request.form }}" required
                               placeholder="请输入注册邮箱">
                    </div>
                    
                    <div class="d-grid gap-2">
                        <button type="submit" class="btn btn-primary">
                            <i class="fas fa-paper-plane me-2"></i>发送重置链接
                        </button>
                    </div>
                </form>
                
                <div class="text-center mt-4">
                    <p class="mb-0">
                        <a href="{{ url_for('auth.login') }}" class="text-decoration-none">
                            <i class="fas fa-arrow-left me-1"></i>返回登录
                        </a>
                    </p>
                </div>
            </div>
        </div>

        <!-- 注意事项 -->
        <div class="card mt-4">
            <div class="card-body">
                <h6><i class="fas fa-info-circle me-2"></i>注意事项</h6>
                <ul class="small text-muted mb-0">
                    <li>重置链接将在1小时后过期</li>
                    <li>如果您没有收到邮件，请检查垃圾邮件文件夹</li>
                    <li>确保输入的邮箱地址与注册时一致</li>
                    <li>如果问题持续，请联系管理员</li>
                </ul>
            </div>
        </div>
    </div>
</div>
{% endblock %}